from selenium.webdriver.common.by import  By
from base_page import BasePage

class CRMlogPage(BasePage) :
    _username = (By.XPATH,"//input[@placeholder='请输入用户名']")
    _password = (By.XPATH,"//input[@placeholder='请输入密码']")
    _log_button = (By.XPATH,"//button/span[text()='登录']")
    _log_success_msg = (By.XPATH,"/html/body/div/div/div[1]/div/div/div[2]/div/span")

    def login_process(self,username,pwd):
        self.find_element_and_input(self._username,username)
        self.find_element_and_input(self._password,pwd)
        self.find_element_and_click(self._log_button)
        return self

    def all_page(self):
        return self.get_page_source()







